﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace TitleContent
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
            
            this.Loaded += new RoutedEventHandler(MainPage_Loaded);
        }

        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            System.Threading.ThreadPool.QueueUserWorkItem(o =>
                {
                    System.Threading.Thread.Sleep(3000);
                    this.Dispatcher.BeginInvoke(new Action(() =>
                        {
                            breakLink.Completed+=new EventHandler(breakLink_Completed);
                            textblock1.Text = "please wait while we're pulling y content.";
                            textblock2.Text = "   our";
                            breakLink.Begin();
                        }));
                });
        }

        void breakLink_Completed(object sender, EventArgs e)
        {
            progressBar.Visibility = Visibility.Collapsed;
            dimDown.Begin();
        }
    }
}
